<template>
	<view class="order-detail-page">
		<custom-title-bar bgColor="white" back> 订单详情 </custom-title-bar>

		<!-- 取餐信息 -->
		<view class="pick-up-number container m-auto shadow">
			<view class="title">取餐号</view>
			<view class="number">T0008</view>
			<view class="tips">前面有5单正在制作中</view>
		</view>

		<!-- 已购商品列表 -->
		<view class="goods-list container m-auto shadow">
			<view class="store-name m-auto truncate">
				蜜雪冰城
			</view>
			<view class="line m-auto"></view>
			<view class="goods-item m-auto" v-for="item in 3" :key="item">
				<view style="display: flex;">
					<view class="cover">
						<image class="cover-img" src="/static/images/goods.png" mode="aspectFill"></image>
					</view>
					<view class="goods-info">
						<view class="name truncate">杨枝甘露</view>
						<view class="remark">
							<view class="item">去冰</view>
							<view class="item">少糖</view>
						</view>
					</view>
				</view>
				<view class="price">
					<view class="amount">
						<view class="identifier"> ¥ </view>
						<view class="num">18</view>
					</view>
					<view class="count">x1</view>
				</view>
			</view>
			<view class="line m-auto" style="margin-top: 24rpx;"></view>
			<!-- 合计 -->
			<view class="total m-auto">
				<view class="total-content">
					共3件商品，合计：
					<text class="ident">¥</text>
					<text class="amount">54</text>
				</view>
			</view>
		</view>

		<!-- 订单信息 -->
		<view class="order-info container m-auto shadow">
			<view class="title">订单信息</view>
			<view class="line m-auto" style="margin-bottom: 4rpx;"></view>
			<view class="info-item">
				下单时间：2025.4.17 00:00
			</view>
			<view class="info-item">
				订单编号：Y883732233456256567
			</view>
			<view class="info-item">
				订单备注：少冰
			</view>
		</view>

		<!-- 退款联系 -->
		<view class="back-money container m-auto">
			如需退款，请联系门店
		</view>
	</view>
</template>

<script setup>
</script>

<style lang="scss" scoped>
	// 取餐号
	.pick-up-number {
		height: 290rpx;
		overflow: hidden;
		margin-top: 20rpx;
		text-align: center;
		border-radius: 20rpx;
		background-color: white;

		.title {
			color: #A2A2A2;
			font-size: 32rpx;
			margin-top: 52rpx;
		}

		.number {
			color: #3B3B3B;
			font-size: 56rpx;
			font-weight: bold;
			margin-top: 15rpx;
		}

		.tips {
			color: #A2A2A2;
			font-size: 28rpx;
			margin-top: 26rpx;
		}
	}

	.line {
		width: 92%;
		height: 1rpx;
		background-color: #eee;
	}

	// 已购商品列表
	.goods-list {
		margin-top: 32rpx;
		border-radius: 20rpx;
		padding-bottom: 28rpx;
		background-color: white;

		.store-name {
			width: 100%;
			color: #333;
			height: 90rpx;
			padding: 0 26rpx;
			font-size: 26rpx;
			font-weight: 500;
			line-height: 90rpx;
		}

		.goods-item {
			width: 92%;
			display: flex;
			margin-top: 24rpx;
			align-items: center;
			justify-content: space-between;

			.cover {
				width: 116rpx;
				height: 116rpx;
				overflow: hidden;
				border-radius: 16rpx;

				.cover-img {
					width: 100%;
					height: 100%;
				}
			}

			.goods-info {
				width: 260rpx;
				height: 116rpx;
				margin-left: 24rpx;

				.name {
					width: 100%;
					color: #3B3B3B;
					font-size: 28rpx;
				}

				.remark {
					width: 100%;
					display: flex;
					color: #B3B3B3;
					flex-wrap: wrap;
					font-size: 20rpx;
					margin-top: 10rpx;

					.item {
						margin-right: 8rpx;
					}
				}
			}

			.price {
				.amount {
					color: #333;
					display: flex;
					font-size: 32rpx;
					font-weight: bold;

					.identifier {
						font-size: 20rpx;
						font-weight: normal;
						margin-top: 10rpx;
					}
				}

				.count {
					color: #B3B3B3;
					font-size: 20rpx;
					text-align: right;
					margin-right: 5rpx;
				}
			}
		}

		// 合计
		.total {
			width: 92%;
			height: 45rpx;
			color: #3B3B3B;
			font-size: 28rpx;
			font-weight: 500;
			margin-top: 20rpx;
			position: relative;

			.total-content {
				right: 0;
				position: absolute;

				.ident {
					font-size: 20rpx;
					margin-top: 10rpx;
					margin-right: 5rpx;
				}

				.amount {
					font-size: 36rpx;
					font-weight: bold;
				}
			}
		}
	}

	// 订单信息
	.order-info {
		margin-top: 36rpx;
		border-radius: 20rpx;
		padding-bottom: 70rpx;
		background-color: white;

		.title {
			width: 100%;
			height: 90rpx;
			padding: 0 26rpx;
			font-size: 26rpx;
			font-weight: 500;
			line-height: 90rpx;
		}

		.info-item {
			width: 100%;
			color: #A2A2A2;
			font-size: 26rpx;
			padding: 0 26rpx;
			margin-top: 24rpx;
		}
	}

	// 退款联系
	.back-money {
		color: #A2A2A2;
		font-size: 24rpx;
		margin-top: 30rpx;
		text-align: center;
		text-decoration: underline;
	}
</style>